Guard Reasoning for CHR Optimization
نویسندگان
چکیده
Constraint Handling Rules (CHR) is a high-level language commonly used to write constraint solvers. Most CHR programs depend on the refined operational semantics, resulting in an obfuscated logical reading and potential misbehavior under the theoretical operational semantics. We introduce two source to source transformations: guard simplification and occurrence subsumption. By removing redundant guards and eliminating redundant generated code for subsumed occurrences, they improve performance and allow CHR programmers to write self-documented rules with a clear logical reading. Formal correctness proofs are given, implementation in the K.U.Leuven CHR compiler is presented and experimental results are discussed.
منابع مشابه
Guard and Continuation Optimization for Occurrence Representations of CHR
Constraint Handling Rules (CHR) is a high-level rule-based language extension, commonly embedded in Prolog. We introduce a new occurrence representation of CHR programs, and a new operational semantics for occurrence representations, equivalent to the widely implemented refined operational semantics. The occurrence representation allows in a natural way to express guard and continuation optimiz...
متن کاملDefault Reasoning in CHR∨
CHR∨ has emerged as a versatile knowledge representation language, usable for an unparalleled variety of automated reasoning tasks: constraint solving, optimization, classification, subsumption, classical deduction, abduction, truth-maintenance, belief revision, belief update and planning. In this paper, we add default reasoning to this list, by showing how to represent default logic theories i...
متن کاملReasoning about passive declarations in CHR
The programming language of Constraint Handling Rules (CHR) is gaining more and more popularity and this has motivated the development of new optimization techniques to be applied in implementations of CHR. As for other logic programming languages, a program written CHR can be understood declaratively as a logical formula and as a procedural specification, and CHR has different tools for manual...
متن کاملGuard Simplification in CHR programs
Constraint Handling Rules (CHR) is a high-level language commonly used to write constraint solvers. Most CHR programs depend on the refined operational semantics, resulting in an obfuscated logical reading and non-termination or worse under the theoretical operational semantics. We introduce a source to source transformation called guard simplification which allows CHR programmers to write self...
متن کاملGuard Reasoning in the Refined Operational Semantics of CHR
Constraint Handling Rules (CHR) is a high-level programming language based on multi-headed guarded rules. The original highlevel operational semantics of CHR is very nondeterministic. Recently, instantiations of the high-level operational semantics have been proposed and implemented, removing sources of nondeterminism and hence allowing better execution control. Rule guards may be redundant und...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2005